<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>elFinder 2.1.x source version with PHP connector</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2" />

	<!-- Require JS (REQUIRED) -->
	<!-- Rename "main.default.js" to "main.js" and edit it if you need configure elFInder options or any things -->
	<script data-main="./main.default.js" src="//cdn.bootcss.com/require.js/2.3.3/require.min.js"></script>

</head>
<body>

<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
<script language="JavaScript">
    function getContextPath() {
        //获取当前网址，如： http://localhost:8080/GameFngine/share/meun.jsp
        var curWwwPath = window.document.location.href;
        //获取主机地址之后的目录，如： GameFngine/meun.jsp
        var pathName = window.document.location.pathname;
        var pos = curWwwPath.indexOf(pathName);
        //获取主机地址，如： http://localhost:8080
        var localhostPaht = curWwwPath.substring(0, pos);
        //获取带"/"的项目名，如：/GameFngine
        var projectName = pathName.substring(0,pathName.substr(1).indexOf('/') + 1);
        return projectName=="/static"?"":projectName
    }
</script>
</body>
</html>
